package com.code.day11DaiMaKuai.MimingNeiBUN;

import javax.swing.plaf.DimensionUIResource;

public class Dome {
    public static void main(String[] args) {
        new USB(){

            @Override
            public void open() {
                System.out.println("鼠标打开了");
            }
            @Override
            public void close() {

                System.out.println("猫喝水");
            }

        }.open();

//        创建有名对象类   需要执行多个就得声明变量
        USB usb = new USB(){
            @Override
            public void open() {
                System.out.println("鼠标关闭了");
            }
            @Override
            public void close() {
                System.out.println("猫喝水");
            }
        };
        usb.open();
        usb.close();

    }
}
